package com.asset.mapper;

import com.asset.pojo.AssetHandle;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

/**
 * 资产处置访问接口
 * @author 11725
 */
public interface AssetHandleMapper extends Mapper<AssetHandle> {
    /**
     * 更新审批状态，需指定 记录 id、审批时间
     * @param record    AssetHandle 对象
     * @return          受影响行数
     */
    @Update("update tab_asset_handle set approval_state = #{status}, handle_time = #{handleTime} "
            + "where handle_id = #{id} and approval_state = 0")
    int updateStatus(AssetHandle record);
}
